﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.BookStore.Ball
{
    public class BallModel: AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 类型--单选
        /// </summary>
        public BallType Type { get; set; }
        /// <summary>
        /// 价格
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 品牌 --下拉
        /// </summary>
        public BallBrand Brand { get; set; }
        /// <summary>
        /// 爱好--多选
        /// </summary>
        public string Hobby { get; set; }

        // EF Core 需要的保护构造函数
        protected BallModel() { }
        // 业务代码使用的公共构造函数
        public BallModel(
            Guid id,
            string name,
            BallType type,
            Decimal price,
            BallBrand brand,
            string hobby
            ) : base(id) { 
            Name=name;
            Type=type;
            Price=price;
            Brand=brand;
            Hobby=hobby;
        }

    }
}
